<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.domain.Article"%>
<%@page import="aex.service.ShowViewService"%>
<%@page import="aex.util.SSHUtil"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="aex.domain.Puser"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
WebApplicationContext ac = SSHUtil.getApplication(request);
ShowViewService svService = (ShowViewService) ac.getBean(ShowViewService.SERVICE_NAME);
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="keywords" content="${webKeyWord}">
	<meta name="description" content="${webDescription}" />
	<title> ${webTitle} </title>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
  	
	<link rel="stylesheet" type="text/css" href="systemStyle/H-ui.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/article.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/comment.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/drugs_detailed.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/therapy_detailed.css" />


	
	<script type="text/javascript" src="http://libs.useso.com/js/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	<script type="text/javascript" src="expandStyle/therapy_detailed.js"></script>
 <script type="text/javascript" src="systemJs/Validform_v5.3.2_min.js"></script>
	
	</head>
  <body>
    
    <!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>
	
	
	
	
 <!--主要内容-->
  <div class="container">
     <div class="container_left">
         <!--当前位置-->
         <div id="place_here">
            当前位置 > <a href="#">广场</a> > <a href="#">${medicine.articleCategory.acName}</a>
         </div>
         
          <div class="drugs_box">
             <div class="con2_suggestions">
                   <span>1</span>
                   <h2><a href="javascript:void(0);">${therapy.thName }</a></h2>
                   <div class="con2_help">${therapy.thUseful }</div>
             </div>
             <div class="con2_intrution">
                 	${therapy.thMethod}
             </div>
         </div>
         
         <!--综合评价-->
         <div class='evaluation_box'>
              <!--分享-->
            <div class="bdsharebuttonbox" id="share_Id">
               <div class="share_title">分享：&nbsp;&nbsp;</div> <a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone"></a><a href="#" class="bds_tsina" data-cmd="tsina"></a><a href="#" class="bds_tqq" data-cmd="tqq"></a><a href="#" class="bds_renren" data-cmd="renren"></a><a href="#" class="bds_weixin" data-cmd="weixin"></a>
              </div>
              <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=1244693285.js?cdnversion='+~(-new Date()/36e5)];</script>
         </div>
          <!--所有评价-->
          <div class="all_appraise">
             <div class="appraise_tittle">
                所有评价
             </div>
             
             <c:forEach var="item" items="${pageBean.objList}" varStatus="status">  
             <div class="comment_contentBox">
              <div class="tourist">
                 <img src="${item.puser.puPhoto}" width="50px" height="50px" >
                <div><a href="#">${item.puser.puName}</a></div>
              </div>
              <div class="comment_content">
                <ul class="appraise_list">
                   <li id='appraise_help'>${item.ctUse}</li>
                    <li>${item.thUseTime}</li>
                </ul>
                <div class="c_contentTop">
                  ${item.ctContent}
                </div>
              </div>
            </div>
            </c:forEach>
          <!--分页-->
		<jsp:include page="/systemPage/paginationVisitor.jsp"></jsp:include>


         <!--写评价-->
           <div class="appraise_tittle appraise_tittle1">
                写评价
             </div>
                  <form id="" action="visitor/visitor_addCommentTherapy.do?id=${therapy.thId}" method="post" class="Huiform demoform">
            <div class="write_box">
              <div class="write_appraise">
                 <div class="codeView">
                    <div class="formRow">
                      <div class="formControls">
                         <textarea name="content" cols="" rows="" class="textarea"  placeholder="说点什么..." datatype="*" nullmsg="评论不能为空！"></textarea>
                      </div>
                    </div>
                    <div class="formRow">
                       <input type="submit" value="评论"  class="button" id="p_comment1">
                    </div>
                  
                </div>
              </div>
               <div class="appraise_right">
                  <div class="appraise_rightLine">
                      <div class="rightLine_title">有无帮助：</div>
                      <div class="rightLine_number1">
                          <label><input type="radio" name="isHelp" checked="checked" value="1"> 有帮助</label> 
                          <label><input type="radio" name="isHelp" value="0"> 无帮助</label>
                      </div>
                      <div class="rightLine_meaning1">
                          
                      </div>
                  </div>
                  <div class="appraise_rightLine appraise_rightLine1">
                      <div class="rightLine_title">使用时间：</div>
                      <div class="rightLine_number2">
                          <div class='diy_select'>
                            <input type='hidden' name='useTimeType' class='diy_select_input'/>
                            <div class='diy_select_txt'>请选择使用时间</div>
                            <div class='diy_select_btn'></div>
                            <ul class='diy_select_list'>
                              <li>十次以下</li>
                              <li>一个月</li>
                              <li>半年以上</li>
                              <li>一年以上</li>
                            </ul>
                          </div>
                      </div>
                      <div class="rightLine_meaning2">
                          
                      </div>
                  </div>
              </div>
            </div>
         </form>
     </div>
  	 <!-- 侧边栏 -->
  	 <jsp:include page="/systemPage/cbl1.jsp"></jsp:include>
  </div>
    <!--网站底部-->
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
	<script type="text/javascript">
$("#menu_3").addClass("selected");
$(".demoform").Validform({
    tiptype:3,
    usePlugin:{
      passwordstrength:{
        minLen:6,//设置密码长度最小值，默认为0;
        maxLen:18,//设置密码长度最大值，默认为30;
        trigger:function(obj,error){
          //该表单元素的keyup和blur事件会触发该函数的执行;
          //obj:当前表单元素jquery对象;
          //error:所设密码是否符合验证要求，验证不能通过error为true，验证通过则为false;          
          //console.log(error);
          if(error){
            obj.parent().find(".Validform_checktip").show();
            obj.parent().find(".passwordStrength").hide();
          }else{
            obj.parent().find(".passwordStrength").show();  
          }
        }
      }
    }
});

/**药品使用时间**/
function diy_select(){this.init.apply(this,arguments)};
diy_select.prototype={
   init:function(opt)
   {
    this.setOpts(opt);
    this.o=this.getByClass(this.opt.TTContainer,document,'div');//容器
    this.b=this.getByClass(this.opt.TTDiy_select_btn);//按钮
    this.t=this.getByClass(this.opt.TTDiy_select_txt);//显示
    this.l=this.getByClass(this.opt.TTDiv_select_list);//列表容器
    this.ipt=this.getByClass(this.opt.TTDiy_select_input);//列表容器
    this.lengths=this.o.length;
    this.showSelect();
   },
   addClass:function(o,s)//添加class
   {
    o.className = o.className ? o.className+' '+s:s;
   },
   removeClass:function(o,st)//删除class
   {
    var reg=new RegExp('\\b'+st+'\\b');
    o.className=o.className ? o.className.replace(reg,''):'';
   },
   addEvent:function(o,t,fn)//注册事件
   {
    return o.addEventListener ? o.addEventListener(t,fn,false):o.attachEvent('on'+t,fn);
   },
   showSelect:function()//显示下拉框列表
   {
    var This=this;
    var iNow=0;
    this.addEvent(document,'click',function(){
       for(var i=0;i<This.lengths;i++)
       {
        This.l[i].style.display='none';
       }
    })
    for(var i=0;i<this.lengths;i++)
    {
      this.l[i].index=this.b[i].index=this.t[i].index=i;
      this.t[i].onclick=this.b[i].onclick=function(ev)  
      {
        var e=window.event || ev;
        var index=this.index;
        This.item=This.l[index].getElementsByTagName('li');

        This.l[index].style.display= This.l[index].style.display=='block' ? 'none' :'block';
        for(var j=0;j<This.lengths;j++)
        {
          if(j!=index)
          {
            This.l[j].style.display='none';
          }
        }
        This.addClick(This.item);
        e.stopPropagation ? e.stopPropagation() : (e.cancelBubble=true); //阻止冒泡
      }
    }
   },
   addClick:function(o)//点击回调函数
   {

    if(o.length>0)
    {
      var This=this;
      for(var i=0;i<o.length;i++)
      {
        o[i].onmouseover=function()
        {
          This.addClass(this,This.opt.TTFcous);
        }
        o[i].onmouseout=function()
        {
          This.removeClass(this,This.opt.TTFcous);
        }
        o[i].onclick=function()
        {
          var index=this.parentNode.index;//获得列表
          This.t[index].innerHTML=This.ipt[index].value=this.innerHTML.replace(/^\s+/,'').replace(/\s+&/,'');
          This.l[index].style.display='none';
        }
      }
    }
   },
   getByClass:function(s,p,t)//使用class获取元素
   {
    var reg=new RegExp('\\b'+s+'\\b');
    var aResult=[];
    var aElement=(p||document).getElementsByTagName(t || '*');

    for(var i=0;i<aElement.length;i++)
    {
      if(reg.test(aElement[i].className))
      {
        aResult.push(aElement[i])
      }
    }
    return aResult;
   },

   setOpts:function(opt) //以下参数可以不设置  //设置参数
   { 
    this.opt={
       TTContainer:'diy_select',//控件的class
       TTDiy_select_input:'diy_select_input',//用于提交表单的class
       TTDiy_select_txt:'diy_select_txt',//diy_select用于显示当前选中内容的容器class
       TTDiy_select_btn:'diy_select_btn',//diy_select的打开按钮
       TTDiv_select_list:'diy_select_list',//要显示的下拉框内容列表class
       TTFcous:'focus'//得到焦点时的class
    }
    for(var a in opt)  //赋值 ,请保持正确,没有准确判断的
    {
      this.opt[a]=opt[a] ? opt[a]:this.opt[a];
    }
   }
}


var TTDiy_select=new diy_select({  //参数可选
  TTContainer:'diy_select',//控件的class
  TTDiy_select_input:'diy_select_input',//用于提交表单的class
  TTDiy_select_txt:'diy_select_txt',//diy_select用于显示当前选中内容的容器class
  TTDiy_select_btn:'diy_select_btn',//diy_select的打开按钮
  TTDiv_select_list:'diy_select_list',//要显示的下拉框内容列表class
  TTFcous:'focus'//得到焦点时的class
});//如同时使用多个时请保持各class一致.
</script>
  </body>
</html>
